<!DOCTYPE html>
<html>


<!-- Mirrored from /theme/hplus/form_basic.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:19:15 GMT -->
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>修改文章</title>
    <meta name="keywords" content="修改文章">
    <meta name="description" content="修改文章">

    <link rel="shortcut icon" href="favicon.ico">
    <link href="http://news.xiangtws.com/__PUBLIC__/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="__PUBLIC__/css/animate.min.css" rel="stylesheet">


    <link href="__PUBLIC__/css/plugins/summernote/summernote.css" rel="stylesheet">
    <link href="http://news.xiangtws.com/__PUBLIC__/css/plugins/summernote/summernote-bs3.css" rel="stylesheet">
    <link href="__PUBLIC__/css/style.min862f.css?v=4.1.0" rel="stylesheet">

</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title" style="min-height: 65px;">
                    <h5>
                        <a href="__CONTROLLER__/index/" title="文章管理">
                            <button type="button" class="btn btn-primary">文章管理</button>
                        </a>
                    </h5>
                </div>
                <div class="ibox-content">
                    <form method="post" class="form-horizontal" id="formSubmit">
                        <input type="hidden" name="id" value="{$info.id}">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">文章标题</label>
                            <div class="col-sm-5">
                                <input type="text" name="title" value="{$info.title}" class="form-control" required>
                            </div>
                        </div>
                        <!--<div class="hr-line-dashed"></div>-->
                        <div class="form-group">
                            <label class="col-sm-2 control-label">文章关键字</label>
                            <div class="col-sm-5">
                                <input type="text" name="keywords" value="{$info.keywords}" class="form-control" required>
                            </div>
                        </div>
                        <!--<div class="hr-line-dashed"></div>-->
                        <div class="form-group">
                            <label class="col-sm-2 control-label">文章分类</label>
                            <div class="col-sm-10">
                                <select class="form-control m-b" name="pid">
                                    <option value="0">请选择文章分类</option>
                                    <volist name="cate_list" id="v">
                                        <option value="<?=$v['id']?>" <?=$v['id']==$info['id']?'disabled':''?><?=$v['id']==$info['pid']?'selected':''?>><?=$v['title']?></option>
                                        <notempty name="v['_child']">  <!--如果存在子集-->
                                            <volist name="v['_child']" id="val">
                                                <option value="<?=$val['id']?>" <?=$val['id']==$info['id']?'disabled':''?><?=$val['id']==$info['pid']?'selected':''?>>&nbsp;--<?=$val['title']?></option>
                                                <notempty name="val['_child']">  <!--如果存在子集-->
                                                    <volist name="val['_child']" id="sval">
                                                        <option value="<?=$sval['id']?>" <?=$sval['id']==$info['id']?'disabled':''?><?=$sval['id']==$info['pid']?'selected':''?>>&nbsp;&nbsp;---<?=$sval['title']?></option>
                                                    </volist>
                                                </notempty>

                                            </volist>
                                        </notempty>
                                    </volist>
                                </select>
                            </div>
                        </div>
                        <!--<div class="hr-line-dashed"></div>-->
                        <!--<div class="form-group">-->
                        <!--<label class="col-sm-2 control-label">文章主图</label>-->
                        <!--<div class="col-sm-5">-->
                        <!--<input class="form-control" name="head_img" value="" placeholder="首页图片链接,多个链接用英文逗号分离">-->
                        <!--</div>-->
                        <!--</div>-->
                        <div class="form-group">
                            <label class="col-sm-2 control-label">文章详情</label>
                            <div class="col-sm-10">
                                <div class="summernote">
                                    {$info.content}
                                </div>
                                <textarea name="content" style=" display:none;"></textarea>
                            </div>
                        </div>
                        
                        <!--<div class="form-group">-->
                            <!--<label class="col-sm-2 control-label">状态</label>-->
                            <!--<div class="col-sm-2">-->
                                <!--<select class="form-control m-b" name="state">-->
                                    <!--<option value="0">待审</option>-->
                                    <!--<option value="1">通过</option>-->
                                    <!--<option value="2">不通过</option>-->
                                    <!--<option value="3">删除</option>-->
                                    <!--<option value="4">结束</option>-->
                                <!--</select>-->
                            <!--</div>-->
                        <!--</div>-->
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-2">
                                <button class="btn btn-primary" type="button" onClick="save()">保存</button>
                                <a class="btn btn-primary" onClick="clswidth()">清除图片宽</a>
                                <a class="btn btn-primary" onClick="uploadimg()">上传图片</a>
                            </div>
                        </div>

                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

<script src="__PUBLIC__/js/jquery.min.js?v=2.1.4"></script>
<script src="__PUBLIC__/js/bootstrap.min.js?v=3.3.6"></script>
<script src="__PUBLIC__/js/plugins/peity/jquery.peity.min.js"></script>
<script src="__PUBLIC__/js/plugins/jqgrid/i18n/grid.locale-cnffe4.js?0820"></script>
<script src="__PUBLIC__/js/plugins/jqgrid/jquery.jqGrid.minffe4.js?0820"></script>
<script src="__PUBLIC__/js/content.min.js?v=1.0.0"></script>
<script src="__PUBLIC__/js/plugins/summernote/summernote.min.js"></script>
<script src="__PUBLIC__/js/plugins/summernote/summernote-zh-CN.js"></script>
<script src="__PUBLIC__/js/layer/layer.js"></script>

<script>
    // <!--富文本-->
    $(document).ready(function(){
        $(".summernote").summernote({lang:"zh-CN"});
        $(".note-editor").css("width","70%");
        $(".note-editor").css("float","left");
        $(".note-editable").css("height","308px");
    });
    var edit=function(){$("#eg").addClass("no-padding");$(".click2edit").summernote({lang:"zh-CN",focus:true})};var save=function(){$("#eg").removeClass("no-padding");var aHTML=$(".click2edit").code();$(".click2edit").destroy()};
</script>

<script>
    // 保存
    function save(){
        html = $(".note-editable").html();
        $("textarea[name='content']").text(html);
        $("#formSubmit").submit();
    }//end fun

    //清除插入的图片宽度
    function clswidth(){
        $(".note-editable").find("img").css('width','');

    }//end fun
    $.ajaxSetup({
        async : false
    });
    //上传图片
    function uploadimg() {
        $(".note-editable img").each(function (index,item) {
            var pic = $(item).attr('src');
            // // 判断图片地址是否包含base64字符串，包含则说明没有上传图片
            if(pic.indexOf("base64") >= 0 ) {
                $.post('http://imgs.xiangtws.com/Api/Index/uploadPic',{pic:pic,domain:'http://zixun.xiangtws.com'},function (data) {
                    $(item).attr('src',data);
                })
            }
        });
    }

</script>
</body>


<!-- Mirrored from /theme/hplus/form_basic.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:19:15 GMT -->
</html>
